package com.yc.navy.goods.service.lmpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yc.navy.goods.bean.OrderItemInfo;
import com.yc.navy.goods.mapper.IOrderItemInfoMapper;
import com.yc.navy.goods.service.IOrderItemInfoService;
import com.yc.navy.goods.util.StringUtil;

@Service
public class OrderItemInfoServiceImpl implements IOrderItemInfoService {
	@Autowired
	private IOrderItemInfoMapper orderItemInfoMapper;
	
	@Override
	public int add(OrderItemInfo orderItemInfo) {
		if(StringUtil.checkNull(orderItemInfo.getBid(),orderItemInfo.getNum(),orderItemInfo.getOid())) {
			return -1;
		}
		return orderItemInfoMapper.add(orderItemInfo);
	}

	@Override
	public List<OrderItemInfo> find(Integer oid) {
		return orderItemInfoMapper.find(oid);
	}

}
